package avicit.bdp.dds;

import avicit.bdp.dds.common.Constants;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;

@SpringBootApplication
@EnableScheduling
@EnableAsync
@EnableWebMvc
@ComponentScan(basePackages = {"avicit"},
        excludeFilters = @ComponentScan.Filter(type = FilterType.REGEX,
                pattern = {"avicit.bdp.dds.server.*"}))
public class StandaloneServer {

    public static void main(String[] args) throws Exception {
//        final TestingServer server = new TestingServer(2181, true);
//        System.setProperty("registry.zookeeper.connect-string", server.getConnectString());
        Thread.currentThread().setName(Constants.THREAD_NAME_STANDALONE_SERVER);
        SpringApplication.run(StandaloneServer.class, args);
    }
}
